<ytata:question listname="question" type="$_GET['type']" category1="$_GET['cat']" category2="$_GET['cat1']" num="5"  startrow="$startrow" tagid="$_GET['t']" key="$_GET['key']" ids="$ids"/>
<volist name="question.list" id="q">
  <div class="ask_list" >
    <eq name="q.issolve" value="1" ><div class="issolve1"></div></eq>
    <div class="tit" onClick="location.href='{$q.url}'" >
      <div class="avatar"><img src="{$q.adduser.avatar}"></div>
      <div class="txt">
        <div class="h  font16 substring link_gray3">
          <empty name="q.title">
            {$q.adduser.nickname}
            
            <else />
            <neq name="q.reward" value="0" ><span class="gold">{$q.reward}</span></neq>
            <a href="{$q.url}">{$q.title}</a>
          </empty>
        
        
        </div>
        
        
        <div class="mo font12 font_gray9">
          
          <span class="lv font9">LV{$q.adduser.exp_lv}</span>
          <notempty name="q.title">
            <span class="us">{$q.adduser.nickname}</span>
          </notempty>
          <span class="us">{$q.addtime|formatdate}</span>
          <span class="us">{$q.click}浏览</span>
        
        </div>
      
      
      </div>
      <div class="more J_more" id="{$q.id}" reply_nickname="{$q.adduser.nickname}" onClick="event.cancelBubble = true"></div>
    </div>
    
    <div class="exp font_gray9 font14" onClick="location.href='{$q.url}'">{$q.describe_cut}
      <neq name="q.answercount" value="0"><span class="reply_count">({$q.answercount}回答)</span></neq>
    </div>
    
    <notempty name="q.tags">
      <div class="tag font10">
        <volist name="q.tags" id="tag">
          <div class="tl">{$tag.tag}</div>
        </volist>
      </div>
    </notempty>
    
    <notempty name="q.img">
      <div class="imgs">
        <volist name="q.img" id="img">
          <div class="imgli J_imgs"><img src="{$img.url}"></div>
        </volist>
      </div>
    </notempty>
	
	<div class="bottomRbtn">
	  
	  
	   <eq name="q.count_praise" value="0">
	  <div class="btn p J_praise" id="J_praise1_{$q.id}" data-id="{$q.id}">赞</div>
	   <else/>
	   <div class="btn p J_praise" id="J_praise1_{$q.id}" data-id="{$q.id}">{$q.count_praise}</div>
	   </eq>
	   
	   
	   <div class="btn f J_follow" id="fav_{$q.id}" data-id="{$q.id}">关注</div>
	   <div class="btn J_reply" data-id="{$q.id}" reply_nickname="{$q.adduser.nickname}">回答</div>
	   
	</div>
  
  </div>
  <div class="uu_spacing"></div>
</volist>
<empty name="question.list"><div class="empty font10">木有可显示的数据喔！</div></empty>
<script>
$('.J_more').off().on('click',function(e){
			var qid=$(this).attr('id');
      var reply_nickname = $(this).attr('reply_nickname');
			var $Scroll = new UpScroll({
				maskClose: true,
				showCancel: true
			});
			$Scroll.setContent(['回复','收藏','举报']);
			$Scroll.show();
			
			$Scroll.getList(1).on('click', function() {
			ajax_login('ajax_reply', {qid:qid,reply_nickname:reply_nickname});
			$Scroll.fast_hide();
			});

    $Scroll.getList(2).on('click', function() {
        ajax_login('ajax_favorites', {id: qid, type:1});
        $Scroll.fast_hide();
    });

    $Scroll.getList(3).on('click', function() {
        var params = {objid: qid, type: '1'};
        ajax_login('ajax_report', params);
        $Scroll.fast_hide();
    });
		
});
	  // 点赞
	   $(".J_praise").off().on('click', function () {
          var qid = $(this).data('id');
          var params = {id: qid, type: '1'};
          ajax_login('praise', params);
      });
      //关注
      $(".J_follow").off().on('click', function () {
          var objid = $(this).data('id');
          ajax_login('ajax_follow', {objid: objid, type:1});
      });

      // 提交回答
	   $(".J_reply").off().on('click', function () {
          var qid = $(this).data('id');
		      var reply_nickname = $(this).attr('reply_nickname');
          var params = {qid: qid,reply_nickname: reply_nickname};
          ajax_login('ajax_reply', params);
      });
	  //分享
	  bind_share();
	  //图片幻灯片
	   $(".J_imgs").off().click(function () {
          // build items array
          var imgs = $(this).closest('.imgs').find('img'),
		  	items = new Array(),
			thisIndex = $(this).closest('.imgs').find('img').index($(this).find('img'));
		  	imgs.each(function(){
		  		items.push({src:$(this).attr('src'),w:1200,h:900});
		  	});
          	swipe(items, thisIndex);
      });
</script>
<empty name="question.list"><!--empty --></empty>